Optimization two-qubit quantum gate by two optical control methods in molecular pendular states

Implementation of quantum gates are important for quantum computations in physical system made of polar molecules. We investigate the feasibility of implementing gates based on pendular states of the molecular system by two different quantum optical control methods. Firstly, the Multi-Target optimal control theory and the Multi-Constraint optimal control theory are described for optimizing control fields and accomplish the optimization of quantum gates. Numerical results show that the controlled NOT gate (CNOT) can be realized under the control of above methods with high fidelities (0.975 and 0.999) respectively. In addition, in order to examine the dependence of the fidelity on energy difference in the same molecular system, the SWAP gate in the molecular system is also optimized with high fidelity (0.999) by the Multi-Constraint optimal control theory with the zero-area and constant-fluence constraints.

the qubits |0� and |1� are considered as quantum basis for single-qubit gate [34][35][36][37] . By same principle, a four-level system can be implemented for two-qubit gate if the quantum basis include |00� , |01� , |10� and |11� which are complete and orthogonal 28 . Both of the two-level system and four-level system can optimize the quantum gates due to the energy difference between different energy levels in molecular systems.
Quantum optical control methods provide a powerful tool to make the quantum initial states evolve to the final states with control fields [38][39][40][41][42] . Rabitz et al proposed Multi-Target Optital Control Theory (MT-OCT) based on the coupled Schrödinger equations 43,44 , and the theory aims to solve the two-point boundary equations step by step with many iterations. This method has attracted attention extensively for the specific physical molecular system 5,6,8,10,12,13,[23][24][25]28 . Later, Rabitz et al have proposed the other quantum optimal control theory based on optimization of unitary operation 45 . The core of this theory is optimization the operation which satisfied Schrödinger equation, and the control field updates with the increasing of iteration. Finally, the unitary operation is applied in any initial state to optimize quantum logical gate to the final state [45][46][47][48][49] . To satisfy conditions named zero-area and constant-fluence of control pulse, Shu and collaborators promoted this theory by adding constraints on control pulse [46][47][48] which is named as Multiple Constraint Quantum Optical Control (MC-OCT). With two important constraints on the optimized control fields during optimization, i.e., no-dc component and constant pulse fluence, then the time-dependent control protocol is keeping the pulse energy unchanged as compared with the initial inputs.
Based on the above analysis, in our work, we apply the above two quantum optical control methods to guide the control fields for optimization of two-qubit quantum logical gates. Particularly, we aim to get the CNOT and SWAP gates and try to find the priority method for optimization of two-qubit gate. The results show that both of the two quantum optical control methods can achieve the high efficiency to get the optimal control fields in the given pendular system. Compared to the results in Ref. 28 , the higher fidelity 0.999 for CNOT and SWAP quantum gates can be reached by MC-OCT in our work, so that an admissible error lower than 10 −3 can be achieved in molecular system theoretically. Furthermore, the simulation difference of optimization situations is studied as well as the energy difference between different quantum basis in pendular system.

Results
Pendular system consisted of polar molecules. We consider two polar diatomic molecules trapped in an external static electric field (ǫ) , due to the Stark interaction, the system can be seen as pendular states resulting from mixing of the field-free rotational states 28 . In rigid-rotor approximation, the Hamiltonian of the two trapped molecules can be written as following and where B is the rotational constant, µ is the permanent dipole moment and Ĵ is the angular momentum operator. θ 1 and θ 2 represent the polar angles between the dipole moment and the static field direction. The first molecule experiences an external static field of ǫ 1 whereas the second molecule experiences an external static field of ǫ 2 . The external static field contains a gradient in position of the two molecules allowing spectroscopic addressing of each site 4 . The eigenstates of Ĥ 1 and Ĥ 2 are designated as pendular states resulting from the mixing of the field-free rotational states by the Stark effect.
As proposed in Ref. 4 , basic qubits are chosen as two molecular states. We can choose the ground state and second excited state |J 0 � and |J 2 � as the two pendular states, which can be described as superpositions of spherical harmonics 28 a j and c j are the coefficients of spherical harmonics and ϕ = 0 . In the absence of a control field, the total Hamiltonian of the two trapped molecules in the basis of the qubit pendular states can be written as a 4 × 4 matrix where Î is a 2 × 2 identity matrix. The eigenenergies E 0 1 and E 1 1 of the Hamiltonian Ĥ 1 are calculated based on the quantum basis in Eq. (3), and E 0 2 and E 1 2 of Ĥ 2 for the second molecule are calculated in the same way. The specific expressions are given as The last term V dd in Eq. (4) describes the dipole-dipole interaction given by 50 where, µ is permanent dipole moment, r 12 is the distance between the two molecules, and α is the angle between the array axis r 12 and the static electric field direction. Specifically, here for convenience calculation, α is set as 90 degree, then the matrix expression of V dd is given as www.nature.com/scientificreports/ where the elements are calculated as C 1 0 = J 0 cos θ 1 J 0 , C 1 1 = J 1 cos θ 1 J 1 , C 1 x = J 0 cos θ 1 J 1 , C 1 * x = J 1 cos θ 1 J 0 , C 2 0 = J 0 cos θ 2 J 0 , C 2 1 = J 1 cos θ 2 J 1 , C 2 x = J 0 cos θ 2 J 1 , and C 2 * x = J 1 cos θ 2 J 0 . So the specific elements of Hamiltonian in Eq. (4) can be written as Optimization CNOT by multi-target optical control theory. In this section, we will optimize the specific quantum gate by applying the method named Multi-Target Optical Control Theory (MT-OCT). In Ref. 28 , {|00� |01� |10� |11�} are a set of orthogonal and complete quantum basis vectors corresponding to pendular system. In the following simulation, we choose the same quantum basis as the four lowest energy levels of molecular pendular system. The specific form can be written as The inherent dipole moment is µ = 8.9 Debye (3.5 a.u.), Ĥ 0 is the Hamiltonian of Eq. (4) and the rotational constant is B = 0.33cm −1 ( 1.5 × 10 −6 a.u.). The static electric field is set as ǫ 1 = 4.4 kV/cm ( 0.86 × 10 −6 a.u.) and ǫ 2 = 6.6 kV/cm ( 1.28 × 10 −6 a.u.) in Eqs. (1) and (2). Then the address of two molecules will have gradient difference. Here, it should be noticed that the µǫ/B is unitless. According to the Ref. 4 , the value of µǫ/B changes between 2 and 5 reasonably, so we choose the values as µǫ 1 /B = 2 and µǫ 2 /B = 3 during the following simualtion. In addition, to facilitate the optimization process, the distance between two molecule are set as r 12 = 50nm ( 9.45 × 10 2 a.u.). The initial pulse is set as E(t) = S(t)E 0 cos(2πυt) , where S(t) is envelope function. The general form is S(t) = sin 2 (πt/T) , E 0 is the amplitude, and the initial value is set as 1.5 kV/cm (2.9×10 −7 a.u.) and the pulse duration T is set as 65 ns (2.6×10 9 a.u.). Based on the above given data, we take the fixed step for Ruge-Kutta method and the Lagrange compensation factor is α 0 =5×10 6 (unitless) and the time step is given as t=0.25 ps. In addition, the cosine matrix elements are , and the specific calculation method can be found in Ref. 33 . The two-qubit quantum gate CNOT and SWAP have the specific form as following According to the principle of CNOT operation, when CNOT is applied on the four quantum basis, the population of |00� and |01� will keep the original distributions. However, the population of |10� and |11� will exchange distributions for each other. Here, in order to make the simulation more efficiently, we choose an initial state to optimize the CNOT based on the above pendular system. For example, when the initial state is [sin(π/3)|00� + cos(π/3)|10�]e −iφ , after the operation of CNOT, then the final state should be [sin(π/3)|00� + cos(π/3)|11�]e −iφ in theory. Whereas the initial population should be zero for |01� and |11�.
In Fig.1a, the optimized pulse of this initial state operated by CNOT is given as function of evolution time and the amplitude of the pulse is around 1.5kV/cm. From Fig.1b, it can be seen the result of central frequency is 0.035 THz ( 1.1785cm −1 ), and the central frequency is the pendular energy level difference which is corresponding to the quantum basis |10� and |11� and satisfies the condition of resonance (the energy value is difference between 1.5726cm −1 and 0.3939cm −1 ).
In Fig. 3, we give the initial state which has the form [sin(π/3)|10� + cos(π/3)|11�]e −iφ as the function of time. And the final population should be 0.00 for |00� , 0.00 for |01� , 0.25 for |10� and 0.75 for |11� in theory. After  (16) is 0.975 while the ideal value should be 1. In order to improve the fidelity (objective) and precision of optimization, we will optimize CNOT through MC-OCT thereinafter.
Optimization CNOT by multi-constraint optical control theory. In this section, we will apply the other method named Multi-Constraint Optical Control Theory (MC-OCT) to do the optimization. And the twoqubit CNOT gate will be optimized based on the the pendular state of SrO-SrO system. The initial control field is set as E(t) = S(t)E 0 cos 2 (2πυt) , where S(t) is the envelope function, and the specific form is S(t) = sin(πt/T) 2 . Where T is the total time and T = 65 ns ( 2.60 × 10 9 a.u.). During the optimization, t = 0.06 ps ( 2.4 × 10 3 a.u.), the iteration step is s = 1.5 × 10 −7 . The initial value of dummy variable s is zero, s can be modulated to find the most optimal control fields E(s, t). E 0 and υ represent amplitude and frequency of control pulse. E 0 = 5 × 10 −2 kV/cm ( 1 × 10 −8 a.u.).
In Table 1, we give the results of different initial states operated by CNOT. F is abbreviation of F(U T ) in Eq. (18), the results is 0.999 which approaches to the ideal value 1. During the calculation and simulation in this section, the initial phase φ is set as 60 (deg). The optimized pulse can be plotted as the function of time in Fig. 4a, and the amplitude of pulse is around 0.06 kV/cm. Besides, it can be seen that the central frequency is 0.035 THz    Then we check the other initial state to optimize the CNOT which is similar to the initial state above by the MT-OCT, and in Fig. 6, when the initial state is [sin(π/3)|00� + cos(π/3)|10�]e −iφ , after the operation of CNOT, the final population is 0.7482 for |00� , 0.0017 for |01� , 0.0004 for |10� and 0.2498 for |11� , which is closed to the ideal value 0.75 for |00� , 0.00 for |01� , 0.00 for |10� and 0.25 for |11� in theory while the fidelity is also 0.999. And in Fig. 7, when the initial state is [sin(π/3)|10� + cos(π/3)|11�]e −iφ , after the operation of CNOT, the final population is 0.0000 for |00� , 0.0000 for |01� , 0.2581 for |10� and 0.7476 for |11� , and the ideal value should be 0.0000 |00� , 0.00001 |01� , 0.2581 |10� and 0.7476 |11� in theory. When the result is compared to the values of 0.0073 for |00� , 0.0034 for |01� , 0.2641 for |10� and 0.7251 for |11� , it can be seen that the former is closer to the theoretical value.
Based on this pendular system, we optimize the CNOT by two different methods named MT-OCT and MC-OCT respectively. Compared the results of both processing, for the same initial state, the fidelity is different   www.nature.com/scientificreports/ Then the optimized pulse is shown in Fig. 8a, and the Fourier transform of the pulse is shown in Fig. 8b, the amplitude of pulse is around E 0 = 1.5kV /cm and the central frequency is 0.0071 THz, which is the energy difference between 0.6337 cm −1 and 0.3939 cm −1 due to the quantum basis |01� and |10� . Meanwhile, the pulse also satisfies the condition of resonance.
Based the same quantum basis and the molecular pendular system, we try to optimize the SWAP logical gate. Compared to the results in optimization of CNOT, it can be seen the energy difference of pendular system is more smaller than in latter, and it needs more time of evolution and intensity of pulse to achieve the ideal fidelity, and the more iterations and longer running time of Code are needed. In summary, both of two-qubit logical gates CNOT and SWAP can be generated ideally in this pendular system.

Discussion
In conclusion, we applied two quantum optimal control methods to find optimized control fields for constructing two-qubit logical gates, specifically, CNOT and SWAP gates. In addition, the pendular states of trapped polar molecules SrO-SrO system are choosen as quantum basis which is analyzed in Ref. 28 . Both of the quantum gates we studied show good performance with high fidelities and ideal population were achieved and close to the theoretical values. The same specific initial states have been studied in this work, and the high fidelities 0.975 and 0.999 were achieved during the optimization for the above gates. Compared to the results in Ref. 28 , our results have demonstrated the higher fidelities and more perfect population which meant the more better optimization for quantum calculation. Meanwhile, the optimization methods is based on iterative solution for the coupled wave function equations, and the required convergence time and Random Access Memory (RAM) are also the important factors should be considered. According to the guidance of Ref. 28 , it was found that the convergence speed in MC-OCT is obviously faster than MT-OCT and the total evolution time have the same rule. Finally, the above two methods can be extended to optimized general quantum gates straightly. In practical experiment for specific systems, MC-OCT with constraints (e.g., pulse energy, fluence and magnitude) should be achieved much easier than MT-OCT. It is also important to discuss analytical realization for experiment. Such as, in Ref. 51 the authors propose and thoroughly investigate the scheme of employing trapped ultracold atoms in optical lattice to function as viable platform for quantum CN and CCN gates. In addition, they present a novel approximation method for realizing one-and two-qubit gates for the realization of quantum algorithms and their discussion can also be extended considering the dissipation effect in Ref. 52 . In Ref. 53 , the authors propose and analyze a detailed experimental procedure for implementing an N-bit discrete quantum Fourier transform. Furthermore, a new application of ballistic nanowires with spinbit interaction to realize some new quantum gates are discussed, such gates would be of interest to be experimentally implemented without scattering process in Ref. 54 . Based on the analysis, we hope the numerical simulation of our work can provide theoretical basis for experimental implementation.

Methods
Multi-target optical control theory. Much attention has recently been devoted to applying optimal control theory for elements of quantum computation in molecular systems. The basic idea is to design laser pulses which allow manipulation of transitions within each qubit separately. For implementing basic quantum gates, the aim is to achieve large transition probabilities with the correct phase from a specific initial state into a final target state by application of an external laser field while minimizing the laser energy. The objective function  in the optimal control theory for elements of quantum computation can be maximized 43,44 where ψ ik (t) and ψ fk (t) is the wave function driven by the optimal laser field, E(t). z is the total number of targets and z = 2N + 1 is set for N qubits. 2N is the number of input-output transitions in the gate transformation, and the supplementary equation is the phase constraint. A small △ϕ can be got by laser pulses during optimization produces and has a weak dependence on the initial qubit state 7,55 . α is the Lagrange multiplier, and the envelope www.nature.com/scientificreports/ function S(t) is sin 2 (πt/T) sin 2 (πt/T) . H is the total Hamiltonian of system and H = H 0 − µǫ(t) , H 0 is Hamiltonian of rotational system and ǫ(t) which makes the rotational state transfer to pendular states composed of two polar molecules. µ is the transition dipole moment and T is the total evolution of time.
In order to get the optimized control field, δ = 0 should be satisfied. And the coupled Schrödinger equations with the control of laser pulse are written as where φ ik is the wave function of ψ ik at the initial time and φ fk is the wave function of ψ fk at the final time. k is the number of equations. The control pulse has the specific form where θ 1 and θ 2 is the angular between the axiex of two molecules and the static external electric field ǫ(t) . By solving partial differential equations, the evolution time varies from 0 to final T. During this processing, the control pulse are optimized and the population and fidelity reach the ideal accuracy. Here, the population of wave function is written as the fidelity is defined as Based on the above the simulation, the first split method and the second split method are used to solve the timedependent Schrödinger equation, the latter is more precisely 43,44 . Multi-constraint optical control theory. The time evolution of wave function for the initial state |i� can be described by �(t) =Û(t, 0)|i� with a unitary evolution operator Û (t, 0) , which is governed by timedependent Schrödinger equation 46,48 with ℏ = 1 (atomic units are used in this work). The goal of this work is to optimize control field E(t) to generate a specified unitary transformation and implement desired logic gate based on specific molecular system, so that a specified unitary transformation H can be realized with the final unitary operator Û T =Û(T, 0) . A convenient mathematical formulation of this control objective (fidelity) is and n is the number of qubits, then n = 2 means the two-qubit gate (CNOT) in this work.
To optimize the control field for maximizing the fidelity, a dummy variable s 0 as used in Ref. 48 is employed to parameterize the optimization, which can be expressed as that can be satisfied by updating the control pulse as In the resonant optical control case 46,47 , the interaction between the dipole-dipole molecule and control field plays an important role, the fidelity can be written as Im{�ψ ik (t)|ψ fk (t)� ψ fk (t) cos θ 1 + cos θ 2 |ψ ik (t)�}.  www.nature.com/scientificreports/ where μ(t) =Û + (t, 0)µÛ(t, 0) , F represents the fidelity in resonance. For practical applications, Eq. (20) may be generalized to include a set of equality constraints F(E(·, s)) , on the optimal optical fields The combined demands in Eqs. (19) and (22) can be fulfilled simultaneously by updating the control field as function of variable s where S(t) ≥ 0 is an envelope function which smoothly turns on and off the control field, and Ŵ is an invertible full rank (M + 1) × (M + 1) square matrix composed of elements Here the optimized control field is limited to satisfy two constraints simultaneously and The zero-pulse area constraint in Eq. (25) implies that the optimized control field does not contain dccomponents, leading to pure ac control, whereas the constant fluence constraint in Eq. (26) keeps the energy of the optimized fields unchanged as compared with the initial guess. The numerical details of performing this multiple constraint quantum optimal control method can be found in previous works 46,47 .

Data availability
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request. dt.